<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>20210340910-郭俊严</title>
    <script src="./js/vue.global.js"></script>
</head>
<body>
    <div class="app">
        <input @keyup.Caps-Lock="cut" type="text" v-model="value">
        <h3>{{msg}}</h3>
    </div>
    <script>
        const { createApp } = Vue
        createApp({
            data(){
                return{
                    value:'',
                    msg:'当前已经切换小写模式！'
                }
            },
            methods:{
                cut(){
                    if(this.msg=='当前已经切换小写模式！'){
                        this.msg = '当前已经切换大写模式！'
                    }else{
                        this.msg = '当前已经切换小写模式！'
                    }
                }
            }
        }).mount('.app')
    </script>
</body>
</html>